package tpo.lmhprovider.lmhprovider.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import pojo.Brand;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface BrandMapper {

    List<Brand> getBrand(Map map);

    @Update("update brand set name=#{name},log=#{log} where id=#{id}")
    int updateBrand(Map map);

    @Insert("insert into brand (name,log,isFlag) values(#{name},#{log},0)")
    int addBrand (Map map);

    @Update("update brand set isFlag=1 where id=#{id}")
    int delBrand(Map map);
}
